package com.snec.oauth2.testUtils;




import com.snec.oauth2.password.Sha256PasswordEncoder;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.stereotype.Controller;

import javax.annotation.Resource;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author ${author}
 * @since 2022-06-20
 */
@Controller
@RequestMapping("/user")
public class UserController {


    /**
     * 测试sha256加密方式
     * @param args
     */
    public static void main(String[] args) {
        Sha256PasswordEncoder md5PassWord = new Sha256PasswordEncoder();

            String encode = md5PassWord.encode("123456");
            System.out.println(encode);

        boolean matches = md5PassWord.matches("198508", "81dc6b3b1cde573d285bc7718b783383b7b2fe1a438a32541e6e9d744dbf7e85");
        System.out.println(matches);

    }

}

